<template>
  <div>
    <router-view v-slot="{ Component, route }">
      <keep-alive :exclude="exclude"  >
        <component :is="initRef(Component)" />
      </keep-alive>
    </router-view>
  </div>
</template>
<script setup>

const emit = defineEmits({
  exposeRef: () => {
    return true
  }
})
const initRef = (component) => {
  const pRef = component?.ref?.r?.value
  emit("exposeRef", pRef)
  return component
}
const out= defineProps(['exclude'])
</script>
<style scoped>






</style>